package swm_enterprise_prj.json_jaxb_test.resources;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import swm_enterprise_prj.json_jaxb_test.model.Weather;

@Path("/weather")
public class WeatherResource {

	@GET
	@Path("/{city}")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public Weather getWeatherByCity(@PathParam("city") String city) {
		
		return new Weather(city, 0.1, 1.0, new Date());
	}
}
